﻿#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>

using namespace std;

struct Coin {
    int weight;
    int value;
    double price; // 单位价值
};

// 比较函数，用于按单位价值降序排序
bool compare(Coin a, Coin b) {
    return a.price > b.price;
}

int main() {
    int N, T; // 表示N堆金币和背包承重为T
    cin >> N >> T;

    vector<Coin> coins(N);

    // 读取金币信息
    for (int i = 0; i < N; i++) {
        cin >> coins[i].weight >> coins[i].value;
        coins[i].price = (double)coins[i].value / coins[i].weight;
    }

    // 按单位价值降序排序
    sort(coins.begin(), coins.end(), compare);

    double totalValue = 0; // 总价值
    int currentWeight = 0; // 当前背包重量

    for (int i = 0; i < N; i++) {
        if (currentWeight + coins[i].weight <= T) {
            // 当前背包还可以容纳这一堆金币
            totalValue += coins[i].value;
            currentWeight += coins[i].weight;
        }
        else {
            // 当前背包已经装满
            double remainingWeight = T - currentWeight;
            totalValue += remainingWeight * coins[i].price;
            break;
        }
    }

    // 输出结果，保留两位小数
    cout << fixed << setprecision(2) << totalValue << endl;

    return 0;
}
// Changes made in feature-branch